package validate

import (
	teamones_helper "github.com/teamones-open/go-helper"
)

// 添加工具数据
type AddToolData struct {
	Name        string `json:"name" binding:"required,max=128"`
	TenantId    int64  `json:"tenant_id" binding:"gte=0"`
	DCC         string `json:"dcc" binding:"required,max=36"`
	Category    string `json:"category" binding:"required,max=128"`
	Description string `json:"description"`
	FileName    string `json:"file_name" binding:"required,max=255"`
	Arguments   string `json:"arguments"`
	Icon        string `json:"icon" binding:"max=128"`
	StyleSheet  string `json:"style_sheet"`
	Tips        string `json:"tips"`
	Parent      string `json:"parent" binding:"max=255"`
	Mode        string `json:"mode" binding:"required,max=32"`
	Type        string `json:"type" binding:"required,max=32"`
}

// 更新工具数据
type UpdateToolData struct {
	Id          uint64 `json:"id" binding:"required"`
	Name        string `json:"name" binding:"max=128"`
	DCC         string `json:"dcc" binding:"max=36"`
	Category    string `json:"category" binding:"max=128"`
	Description string `json:"description"`
	FileName    string `json:"file_name" binding:"max=255"`
	Arguments   string `json:"arguments"`
	Icon        string `json:"icon" binding:"max=128"`
	StyleSheet  string `json:"style_sheet"`
	Tips        string `json:"tips"`
	Parent      string `json:"parent" binding:"max=255"`
	Mode        string `json:"mode" binding:"max=32"`
	Type        string `json:"type" binding:"max=32"`
}

// 把工具从工具删除
type RemoveToolParam struct {
	ID int64 `json:"id" binding:"required"`
}

type SelectToolQuery struct {
	Param teamones_helper.QueryParam `json:"param" binding:"required"`
}

// 添加DCC工具数据
type AddDCCToolData struct {
	TenantId int64  `json:"tenant_id" binding:"gte=0"`
	DCC      string `json:"dcc" binding:"required,max=36"`
	Position string `json:"position" binding:"required"`
	ToolsId  int64  `json:"tools_id" binding:"required"`
}

// 把工具从DCC工具架删除
type RemoveDCCToolParam struct {
	ID int64 `json:"id" binding:"required"`
}

// 把工具从DCC工具架删除
type GetDCCToolsListParam struct {
	TenantId int64  `json:"tenant_id" binding:"gte=0"`
	DCC      string `json:"dcc" binding:"max=36"`
	Position string `json:"position" binding:"max=60"`
}
